<template>
  <div class="max">
    <my-header></my-header>
    <div class="cont-nof teaAtd">
      <div class="tl situation-item">
        <div class="situation-item-titl">学生入校考勤统计信息</div>
        <div class="count-table tl">
          <li class="line">总人数<span class="fr">{{data.total}}人</span></li>
          <li class="line">已入园人数<span class="fr">{{data.in}}人</span></li>
          <a href="#weiruyuan">
            <li class="line">未入园人数<span class="fr">{{data.notIn.length}}人</span></li>
          </a>
          <a href="#qingjia">
            <li class="line">请假人数<span class="fr">{{data.leave.length}}人</span></li>
          </a>
          <a href="#tiwen">
            <li class="line">体温异常人数<span class="fr">{{data.temperatureError.length}}人</span></li>
          </a>
          <a href="#bmi">
            <li class="line">BMI异常人数<span class="fr">{{data.bmiError.length}}人</span></li>
          </a>
        </div>
      </div>
      <div class="tl situation-item" id="weiruyuan">
        <div class="situation-item-titl">未入园</div>
        <div class="count-table tl">
          <div class="flex name">
						<span v-for="item in data.notIn">
							<span>
								{{item}}
							</span>
						</span>
          </div>
        </div>
      </div>
      <div class="tl situation-item" id="qingjia">
        <div class="situation-item-titl">请假</div>
        <div class="count-table tl">
          <div class="flex name">
						<span v-for="item in data.leave">
							<span>
								{{item}}
							</span>
						</span>
          </div>
        </div>
      </div>
      <div class="tl situation-item" id="tiwen">
        <div class="situation-item-titl">体温异常</div>
        <div class="count-table tl">
          <div class="flex name">
						<span v-for="item in data.temperatureError">
							<span>
							{{item}}
							</span>
						</span>
          </div>
        </div>
      </div>
      <div class="tl situation-item" id="bmi">
        <div class="situation-item-titl">BMI异常</div>
        <div class="count-table tl">
          <div class="flex name">
						<span v-for="item in data.bmiError">
							<span>
								{{item}}
							</span>
						</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "MsgTem",
    components: {},
    data() {
      return {
        data: {
          total: 0,
          in: 0,
          notIn: [],
          leave: [],
          temperatureError: [],
          bmiError: [],
        }
      }
    },
    methods: {},
    created() {
      this.data = this.$route.query;
    },
    mounted() {

    }
  }
</script>

<style scoped>
  .teaAtd {
    width: 98%;
    margin: auto;
    margin-top: 1rem;
  }

  .situation-item {
    position: relative;
    border: 1px solid #2aa7e1;
    box-sizing: border-box;
    width: 100%;
    margin: 1.5rem 0;
    padding: 3rem 1rem 1rem 1rem;
  }

  .situation-item-notitl {
    padding: 1rem;
  }

  .situation-item-titl {
    position: absolute;
    top: -1.2rem;
    background: #2aa7e1;
    color: #fff;
    padding: 0 1rem;
  }

  .situation-item li {
    padding: 1rem;
    list-style: square;
    box-sizing: border-box;
  }

  .name {
    width: 100%;
    margin: auto;
    flex-wrap: wrap;
  }

  .name span {
    width: 20%;
    text-align: center;
    padding: 0.5rem 0;
  }

  .situation-item span,
  .situation-item li {
    color: #2c3e50 !important;
  }
</style>
